1. Field of the Invention
The present disclosure generally relates to electronics and, more particularly, to an electronic apparatus including a touch panel and capable of detecting an orientation thereof, and to a method for controlling the electronic apparatus.
2. Description of the Related Art
Recently, the use of a touch panel in electronic apparatuses, such as an imaging apparatus and a mobile phone, has become more popular.
In Japanese Patent Application Laid-Open No. 2011-193249, an imaging apparatus is discussed in which automatic focusing (AF) can be performed based on the touched position on a touch panel, and photographing can be performed in response to the touch being released.
In Japanese Patent Application Laid-Open No. 10-207633, a display device with a touch panel is proposed in which even when relative orientation between the user and the touch panel is changed, operational feeling of the user is unchanged. Specifically, a technique is discussed that changes a display original point so that when the orientation of the touch panel changes with respect to the user, displayed items are rotated to be displayed. Furthermore, a technique of changing an original point of a touch input and converting coordinates of the touched position into those based on the changed original point has been proposed.
In an apparatus such as that discussed in Japanese Patent Application Laid-Open No. 10-207633, the displayed positions of display items such as a touch icon are changed in accordance with a change in the display original point caused by the change in the orientation of the touch panel. Thus, when the orientation of the touch panel that is being touched changes, if the touched position of the user remains the same after the orientation is changed, the touch icon that has been touched before the orientation is changed might be displayed at a position different from the touched position after the orientation is changed. Accordingly, if a function allocated to the touch icon that has been touched before the orientation is changed is executed after the orientation is changed, a function of a touch icon that is displayed at a position different from the touched position is executed. Therefore, a function intended by the user might not be executed after the orientation is changed, and thus an operational error might occur. On the other hand, execution of a function of the touch icon displayed at the touched position after the orientation is changed is an operational error if the user thought that the function of the touch icon that has been touched before the orientation is changed will be executed even after the orientation is changed. Such problems are particularly the case in a mobile apparatus discussed in Japanese Patent Application Laid-Open No. 2011-193249, where an orientation of a touch panel that is being touched can be easily switched between vertical, horizontal, upside down, and the like.